﻿@using OpenData.WebApp.Models

@model  ExecuteModel
@{
    ViewBag.Title = "Execute";
}
<h2>@ViewBag.Title.</h2>
<div class="row">
    <div class="col-md-12">
        @using (Html.BeginForm("Execute", "Home", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
        {
        @Html.AntiForgeryToken()
        <h4>@this.Model.Output</h4>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        <div class="form-group">
            @Html.LabelFor(m => m.Js, new { @class = "col-md-2 control-label" })
            <div class="col-md-10">
                @Html.TextAreaFor(m => m.Js, new { @class = "form-control" })
                @Html.ValidationMessageFor(m => m.Js, "", new { @class = "text-danger" })
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(m => m.Input, new { @class = "col-md-2 control-label" })
            <div class="col-md-10">
                @Html.TextBoxFor(m => m.Input, new { @class = "form-control" })
                @Html.ValidationMessageFor(m => m.Input, "", new { @class = "text-danger" })
            </div>
        </div>            <div class="form-group">
            @Html.LabelFor(m => m.Output, new { @class = "col-md-2 control-label" })
            <div class="col-md-10">
                @Html.TextBoxFor(m => m.Output, new { @class = "form-control" })
                @Html.ValidationMessageFor(m => m.Output, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Log in" class="btn btn-default" />
            </div>
        </div>
        <p>
            @Html.ActionLink("Register as a new user", "Register")
        </p>

        }
    </div>
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}